package cn.rui.controller;

import cn.rui.aspects.Log;
import cn.rui.common.Result;
import cn.rui.pojo.vo.PageResult;
import cn.rui.service.OperationLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author 徽州大都督
 * @date 2021/05/17
 */
@RestController
@RequestMapping("operation")
public class OperationLogController {

    @Autowired
    private OperationLogService operationLogService;

    @PostMapping("findPage")
    //@Log("查询登录日志")
    public Map findPage(@RequestBody PageResult pageResult) {

        return operationLogService.findPage (pageResult);
    }

    @DeleteMapping("deleteById/{id}")
    @Log("删除操作日志")
    public Result deleteById(@PathVariable("id") Integer id) {
        return operationLogService.deleteById (id);
    }
}
